package com.zjcloud.academic.schedule.mapper;

import com.zjcloud.academic.domain.ScScheduleResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * �ſν��Mapper�ӿ�
 * 
 * @author zhijiao
 * @date 2024-07-05
 */
public interface AcademicScheduleScScheduleResultMapper 
{
    /**
     * ��ѯ�ſν��
     * 
     * @param id �ſν������
     * @return �ſν��
     */
    public ScScheduleResult selectScScheduleResultById(Long id);

    /**
     * ��ѯ�ſν���б�
     * 
     * @param scScheduleResult �ſν��
     * @return �ſν������
     */
    public List<ScScheduleResult> selectScScheduleResultList(ScScheduleResult scScheduleResult);

    /**
     * �����ſν��
     * 
     * @param scScheduleResult �ſν��
     * @return ���
     */
    public int insertScScheduleResult(ScScheduleResult scScheduleResult);

    /**
     * �޸��ſν��
     * 
     * @param scScheduleResult �ſν��
     * @return ���
     */
    public int updateScScheduleResult(ScScheduleResult scScheduleResult);

    /**
     * ɾ���ſν��
     * 
     * @param id �ſν������
     * @return ���
     */
    public int deleteScScheduleResultById(Long id);

    /**
     * 批量删除课程安排结果
     * 
     * @param ids ��Ҫɾ����������������
     * @return ���
     */
    public int deleteScScheduleResultByIds(Long[] ids);

    /**
     * ����ſγ�ͻ
     *
     * @param scheduleResult �ſν����Ϣ
     * @return ���
     */
    public int checkScheduleConflict(ScScheduleResult scheduleResult);

    /**
     * ��ȡ�ſ�ͳ������
     *
     * @param semesterId ѧ��ID
     * @param teacherId ��ʦID
     * @param classroomId ����ID
     * @return �α�ͳ������
     */
    public Map<String, Object> getScheduleStatistics(@Param("semesterId") Long semesterId, 
                                                    @Param("teacherId") Long teacherId, 
                                                    @Param("classroomId") Long classroomId);

    /**
     * �������κŲ�ѯ�ſν���б�
     *
     * @param batchNo ���κ�
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectByBatchNo(@Param("batchNo") String batchNo);

    /**
     * ����ѧ��ID��ѯ�ſν���б�
     *
     * @param semesterId ѧ��ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectBySemesterId(@Param("semesterId") Long semesterId);

    /**
     * ���ݽ�ʦID��ѯ�ſν���б�
     *
     * @param teacherId ��ʦID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectByTeacherId(@Param("teacherId") Long teacherId);

    /**
     * ���ݽ���ID��ѯ�ſν���б�
     *
     * @param classroomId ����ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectByClassroomId(@Param("classroomId") Long classroomId);

    /**
     * ���ݰ༶ID��ѯ�ſν���б�
     *
     * @param classId �༶ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectByClassId(@Param("classId") Long classId);

    /**
     * ���ݿγ�ID��ѯ�ſν���б�
     *
     * @param courseId �γ�ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectByCourseId(@Param("courseId") Long courseId);

    /**
     * ����ѧ��ID�ͽ�ʦID��ѯ�ſν���б�
     *
     * @param semesterId ѧ��ID
     * @param teacherId ��ʦID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectBySemesterAndTeacher(@Param("semesterId") Long semesterId, 
                                                           @Param("teacherId") Long teacherId);

    /**
     * ����ѧ��ID�ͽ���ID��ѯ�ſν���б�
     *
     * @param semesterId ѧ��ID
     * @param classroomId ����ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectBySemesterAndClassroom(@Param("semesterId") Long semesterId, 
                                                             @Param("classroomId") Long classroomId);

    /**
     * ����ѧ��ID�Ͱ༶ID��ѯ�ſν���б�
     *
     * @param semesterId ѧ��ID
     * @param classId �༶ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectBySemesterAndClass(@Param("semesterId") Long semesterId, 
                                                         @Param("classId") Long classId);

    /**
     * ����ѧ��ID�Ϳγ�ID��ѯ�ſν���б�
     *
     * @param semesterId ѧ��ID
     * @param courseId �γ�ID
     * @return �ſν���б�
     */
    public List<ScScheduleResult> selectBySemesterAndCourse(@Param("semesterId") Long semesterId, 
                                                          @Param("courseId") Long courseId);

    /**
     * �������κ�ɾ���ſν��
     *
     * @param batchNo ���κ�
     * @return ���
     */
    public int deleteByBatchNo(@Param("batchNo") String batchNo);

    /**
     * 批量删除课程安排结果
     * @param semesterId ѧ��ID
     * @return ���
     */
    public int deleteBySemesterId(@Param("semesterId") Long semesterId);
}